package com.alex.server.dto;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

public class UserDto {

    /**
     * 全局唯一标识符
     */
    private String id;

    /**
     * 组织id（is_admin字段为1时，此字段为必填）
     */
    private String relationId;

    /**
     * 用户名
     */
    private String username;

    /**
     * 邮箱
     */
    private String userEmail;

    /**
     * 是否启用 true是   false否
     */
    private Integer isEnabled;

    /**
     * 最后登录IP
     */
    private String lastLoginIp;

    /**
     * 密码
     */
    private String password;

    /**
     * 登录错误次数
     */
    private Integer loginErrorCount;

    /**
     * 登录次数
     */
    private Integer loginCount;

    /**
     * 最后登录时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date lastLoginTime;

    /**
     * 用户组
     */
    private Integer groupId;

    /**
     * 用户等级
     */
    private Integer levelId;

    /**
     * 积分
     */
    private Integer integral;

    /**
     * 手机号
     */
    private String usePhone;

    /**
     * 密码最后被改变时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date lastPasswordChange;

    /**
     * 是否管理员
     */
    private Integer isAdmin;

    /**
     * 是否已重置密码
     */
    private Integer isResetPassword;

    /**
     * 提醒修改密码消息是否已发
     */
    private Integer passMsgHasSend;

    /**
     * 创建时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;

    /**
     * 修改时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;

    /**
     * 逻辑删除标识。仅且仅有0和1两个值，1表示已经被逻辑删除，0表示正常可用。
     */
    private Integer deletedFlag;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getRelationId() {
        return relationId;
    }

    public void setRelationId(String relationId) {
        this.relationId = relationId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getUserEmail() {
        return userEmail;
    }

    public void setUserEmail(String userEmail) {
        this.userEmail = userEmail;
    }

    public Integer getIsEnabled() {
        return isEnabled;
    }

    public void setIsEnabled(Integer isEnabled) {
        this.isEnabled = isEnabled;
    }

    public String getLastLoginIp() {
        return lastLoginIp;
    }

    public void setLastLoginIp(String lastLoginIp) {
        this.lastLoginIp = lastLoginIp;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getLoginErrorCount() {
        return loginErrorCount;
    }

    public void setLoginErrorCount(Integer loginErrorCount) {
        this.loginErrorCount = loginErrorCount;
    }

    public Integer getLoginCount() {
        return loginCount;
    }

    public void setLoginCount(Integer loginCount) {
        this.loginCount = loginCount;
    }

    public Date getLastLoginTime() {
        return lastLoginTime;
    }

    public void setLastLoginTime(Date lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
    }

    public Integer getGroupId() {
        return groupId;
    }

    public void setGroupId(Integer groupId) {
        this.groupId = groupId;
    }

    public Integer getLevelId() {
        return levelId;
    }

    public void setLevelId(Integer levelId) {
        this.levelId = levelId;
    }

    public Integer getIntegral() {
        return integral;
    }

    public void setIntegral(Integer integral) {
        this.integral = integral;
    }

    public String getUsePhone() {
        return usePhone;
    }

    public void setUsePhone(String usePhone) {
        this.usePhone = usePhone;
    }

    public Date getLastPasswordChange() {
        return lastPasswordChange;
    }

    public void setLastPasswordChange(Date lastPasswordChange) {
        this.lastPasswordChange = lastPasswordChange;
    }

    public Integer getIsAdmin() {
        return isAdmin;
    }

    public void setIsAdmin(Integer isAdmin) {
        this.isAdmin = isAdmin;
    }

    public Integer getIsResetPassword() {
        return isResetPassword;
    }

    public void setIsResetPassword(Integer isResetPassword) {
        this.isResetPassword = isResetPassword;
    }

    public Integer getPassMsgHasSend() {
        return passMsgHasSend;
    }

    public void setPassMsgHasSend(Integer passMsgHasSend) {
        this.passMsgHasSend = passMsgHasSend;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getDeletedFlag() {
        return deletedFlag;
    }

    public void setDeletedFlag(Integer deletedFlag) {
        this.deletedFlag = deletedFlag;
    }


    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", relationId=").append(relationId);
        sb.append(", username=").append(username);
        sb.append(", userEmail=").append(userEmail);
        sb.append(", isEnabled=").append(isEnabled);
        sb.append(", lastLoginIp=").append(lastLoginIp);
        sb.append(", password=").append(password);
        sb.append(", loginErrorCount=").append(loginErrorCount);
        sb.append(", loginCount=").append(loginCount);
        sb.append(", lastLoginTime=").append(lastLoginTime);
        sb.append(", groupId=").append(groupId);
        sb.append(", levelId=").append(levelId);
        sb.append(", integral=").append(integral);
        sb.append(", usePhone=").append(usePhone);
        sb.append(", lastPasswordChange=").append(lastPasswordChange);
        sb.append(", isAdmin=").append(isAdmin);
        sb.append(", isResetPassword=").append(isResetPassword);
        sb.append(", passMsgHasSend=").append(passMsgHasSend);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", deletedFlag=").append(deletedFlag);
        sb.append("]");
        return sb.toString();
    }

}